home *** CD-ROM | disk | FTP | other *** search
- /makepattern defed /xt xdf
- xt not {/yt save def} if
- userdict begin /fhpatdict 12 dict def end
- fhpatdict begin
- /PatternType 1 def
- /PaintType 1 def
- /TilingType 1 def
- /BBox [0 0 8 8] def
- /XStep 8 def
- /YStep 8 def
- /PatMtx [1 0 0 -1 0 8] def
- /PatIMtx [1 0 0 1 0 0] def
- /PaintProc
- {begin FHPatColor vc 8 8 true PatMtx PatData imagemask end} bdf
- /FHPatColor [0 0 0 0] def
-
-
- end
- /macpatorient{1 0 dtransform 0 eq exch 0 ne and}bdf
- /veccalc { dtransform round exch round exch idtransform dup mul exch dup mul exch add sqrt } bdf
- gsave
- macpatorient
- initmatrix
- 0 0 transform
- 2 copy
- round exch round exch
- 2 index sub exch 3 index sub exch
- idtransform translate
- pop pop
- 1 0 veccalc 0 1 veccalc
- scale
- {0}{-90}ifelse
- rotate
- matrix currentmatrix
- /PATmtx xdf
- grestore
- /pF{
- gsave 1 setgray filler grestore
- fhpatdict begin
- /PatData xdf
- /FHPatColor xdf
- end
- save
- PATmtx setmatrix
- fhpatdict dup
- /PatIMtx get
- PATmp
- PATsp
- /clipper load /eoclip load eq PATfill
- restore
- }bdf
- /pS{
- fhpatdict begin
- /PatData xdf
- /FHPatColor xdf
- end
- save
- PATprestroke
- PATmtx setmatrix
- gsave 1 setgray stroke grestore
- fhpatdict dup
- /PatIMtx get
- PATmp
- PATsp
- PATstroke
- restore
- }bdf
- xt not {yt restore} if
- xt {/yt save def} if
- /macpatstring 8 string def
- /macpattint 0 def
- /macpatcol [] def
- /macpatangle{1 0 matrix defaultmatrix dtransform exch atan}bdf
- /macpatorient{1 0 dtransform 0 eq exch 0 ne and}bdf
- /macpatcountbits
- {
- 0 exch
- {
- cvi
- 0 1 8
- {
- pop
- dup 1 and
- 0 ne
- {
- exch
- 1 add
- exch
- } if
- -1 bitshift
- } for
- pop
- }
- forall
- }bdf
- /macpatset
- {
- macpatstring copy pop
- 9.375
- macpatangle
- macpatorient not{-90 add}if
- {
- 1 add 4 mul cvi macpatstring exch get exch
- 1 add 4 mul cvi 7 sub bitshift 1 and
- inverted? {1 exch sub} if
- }
- setscreen
-
- 64 macpatstring macpatcountbits sub 64 div
- inverted? {.9921875 exch sub} if
- /macpattint xdf
-
-
- {} st
- fhnumcolors 1 ne
- {
- cvc dup length array copy /macpatcol xdf
- /macpattint 1 macpattint sub def
- macpatcol length 4 eq
- {
- 0 1 3
- {
- macpatcol exch 2 copy
- get .25 lt{0}{macpattint}ifelse put
- }for
- }
- {
- macpatcol dup 0 get .25 lt{0}{macpattint}ifelse 0 exch put
- }ifelse
- macpatcol vc
- }
- {
- currentgray 1 ne {macpattint setseparationgray} if
- }
- ifelse
- }bdf
- /pF{
- gsave
- exch vc
- macpatset
- {filler}fp
- grestore
- }bdf
- /pS{
- gsave
- exch vc
- macpatset
- {stroke}fp
- grestore
- }bdf
- xt {yt restore} if
- /pf{closepath pF}bdf
- /ps{closepath pS}bdf